<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="utf-8" />
        <title>Uploader - ESUI Demo</title>
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="../../../dep/esui/3.2.0-beta.2/demo/assets/google-code-prettify/prettify.css"/>
        <link rel="stylesheet" href="assets/themes/standard.css" />

        <!--[if lt IE 9]>
        <link rel="stylesheet" href="../../../dep/esui/3.2.0-beta.2/demo/assets/ie8.css"/>
        <![endif]-->
    </head>
<body>
    <div class="header">
        <h1 id="branding">ESUI Uploader</h1>
    </div>
    <div class="ui-g main-container">
        <div id="side-bar" class="ui-u-1-5">
            <ul id="navigator" class="ui-nav">
            </ul>
        </div>
        <div id="main" class="ui-u-4-5">
            <h2>Uploader</h2>
            <p>默认的Uploader: 简单模式</p>
            <div class="example">
                <h3>
                    待完成的Uploader
                </h3>
                <div class="row">
                    <div data-ui="type:UploaderCombox;multiple:true;id:UploaderCombox;text:&lt;span class='ui-icon-upload'&gt;&lt;/span&gt;;"></div>
                    <div data-ui="type:Previewer;id:previewer;"></div>
                    <p id="raw"><a href="javascript:">获取rawValue</a></p>
                </div>
            </div>
        </div>
    </div>

    <script src="../../../dep/esui/3.2.0-beta.2/demo/assets/loader/esl.js"></script>
    <script src="config.js"></script>
    <script src="../../../dep/esui/3.2.0-beta.2/demo/demo.js"></script>
    <script src="../../../dep/esui/3.2.0-beta.2/demo/assets/google-code-prettify/prettify.js"></script>
    <script id="main-js">
    require(
        [
            'esui',
            'uploader/Uploader',
            'jquery',
            'underscore',
            'uploader/UploaderCombox',
            'uploader/Previewer',
            'demo',
            'esui/Tab'
        ],
        function (ui, Uploader, $, u, UploaderCombox) {
            window.ui = ui;
            var controls = ui.init();
            var uploaderCombox = controls[0];
            var previewer = ui.get('previewer');
            uploaderCombox.on(
                'complete',
                function (e) {
                    var previewUrl = e.data.result.previewUrl;
                    previewer.addItems([{src: previewUrl, data: e.data.result}]);
                }
            );
        }
    );
    </script>
    <script src="sitemap.js"></script>
</body>
</html>
